﻿using System;
using System.ComponentModel.DataAnnotations;

namespace WebShop.Contracts
{
    [Table("Log")]
    public class LogItem
    {
        [ScaffoldColumn(false)]
        [ForeignKey("User")]
        public Int32? UserID { get; set; }

        [Key]
        [ScaffoldColumn(false)]
        public Int64? LogItemID { get; set; }

        [DisplayFormat(DataFormatString = "{0:R}")]
        [DataType(DataType.Date)]
        public DateTime? Time { get; set; }

        public String Description { get; set; }

        public Int32 EventTypeId { get; set; }

        public virtual User User { get; set; }

        public virtual LogEventType EventType { get; set; }
    }
}